The Division Algorithm

Introduction

What We Mean by Division

Quotients and Remainders: An Intuitive Start

The Division Algorithm: Informal Statement

Every number can be broken into full groups of $b$, plus a leftover that is smaller than $b$.

The Division Algorithm: Formal Statement and Meaning

The formal version uses integers:

Key points:

Working Through Simple Examples

Example 1: $23$ divided by $4$

Example 2: $100$ divided by $9$

Example 3: $7$ divided by $8$

Uniqueness of Quotient and Remainder

Why are $q$ and $r$ unique?

Extending the Idea to Negative Integers

When $a$ is negative, we still want the remainder $r$ to satisfy $0 \le r < b$.

Examples:

Example 1: $a=-7$, $b=5$

Example 2: $a=-1$, $b=4$

General idea:

Common Misconceptions and Pitfalls

Applications in Later Mathematics

The Division Algorithm underlies many important ideas:

Calculator

Quotient

  • Returns the integer quotient when dividing two numbers.
quotient(29, 6) quotient(52, 7)

Mod

  • Returns the remainder when dividing two numbers.
mod(29, 6) mod(52, 7)

Divmod

  • Returns both the quotient and remainder as a pair.
divmod(29, 6) divmod(52, 7)

Exercises

Try to write each answer in the form $$a = bq + r,\quad 0 \le r < b.$$

  1. Write $29$ divided by $6$ in the form $a = bq + r$.

    Solution

    $29$ divided by $6$

    • $6 \cdot 4 = 24$, $6 \cdot 5 = 30 > 29$.
    • So $q = 4$, $r = 5$.
    • $$29 = 6\cdot 4 + 5.$$
  2. Compute the quotient and remainder when $52$ is divided by $7$.

    Solution

    $52$ divided by $7$

    • $7 \cdot 7 = 49$, $7 \cdot 8 = 56 > 52$.
    • So $q = 7$, $r = 3$.
    • $$52 = 7\cdot 7 + 3.$$
  3. Express $7$ divided by $12$ using the Division Algorithm.

    Solution

    $7$ divided by $12$

    • $12$ does not go into $7$ even once.
    • So $q = 0$, $r = 7$.
    • $$7 = 12\cdot 0 + 7.$$
  4. Find $q$ and $r$ such that $-9 = 4q + r$ with $0 \le r < 4$.

    Solution

    Find $q,r$ such that $-9 = 4q + r$, $0 \le r < 4$

    • Try $q = -3$: $4(-3) = -12$.
    • Then $r = -9 - (-12) = 3$.
    • So $q = -3$, $r = 3$, and $$-9 = 4(-3) + 3.$$
  5. Find $q$ and $r$ such that $-20 = 6q + r$ with $0 \le r < 6$.

    Solution

    Find $q,r$ such that $-20 = 6q + r$, $0 \le r < 6$

    • Try $q = -4$: $6(-4) = -24$.
    • Then $r = -20 - (-24) = 4$.
    • So $q = -4$, $r = 4$, and $$-20 = 6(-4) + 4.$$
  6. True or false: In the Division Algorithm, the remainder may equal the divisor.

    Solution

    True or false: In the Division Algorithm, the remainder may equal the divisor

    • The Division Algorithm requires $0 \le r < b$.
    • So the remainder must be strictly less than the divisor.
    • Answer: False.
  7. If $a = 5q + 2$, what is $a$ when $q=13$?

    Solution

    If $a = 5q + 2$ and $q = 13$, find $a$

    • Substitute $q = 13$: $$a = 5\cdot 13 + 2 = 65 + 2 = 67.$$
    • So $a = 67$.
  8. Compute the remainder when $103$ is divided by $10$.

    Solution

    Remainder when $103$ is divided by $10$

    • $10 \cdot 10 = 100$, remainder $3$.
    • So $q = 10$, $r = 3$, and $$103 = 10\cdot 10 + 3.$$
  9. Find $q$ and $r$ such that $0 = 9q + r$ with $0 \le r < 9$.

    Solution

    Find $q,r$ such that $0 = 9q + r$, $0 \le r < 9$

    • Take $q = 0$: then $r = 0$.
    • Check: $0 = 9\cdot 0 + 0$ and $0 \le 0 < 9$.
    • So $q = 0$, $r = 0$.
  10. Explain why the quotient in $a = bq + r$ must be an integer.

    Solution

    Explain why the quotient in $a = bq + r$ must be an integer

    • The Division Algorithm is about writing $a$ as a sum of:
      • an integer multiple of $b$, and
      • a remainder $r$ with $0 \le r < b$.
    • If $q$ were not an integer, $bq$ would not be a whole number, and $a = bq + r$ could not describe how many whole groups of size $b$ fit into $a$.
    • So $q$ must be an integer to keep everything in the world of integers.